package com.moyq5.mvc.maker.test.bean.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * 微信公众号信息
 * @author Moyq5
 * @date 2018年6月23日
 */
@Entity
@Table(name = "uc_weixin")
@DynamicUpdate
public class Weixin implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 微信公众号ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "native")@GenericGenerator(name = "native", strategy = "native")
    @Column(name = "weixin_id")
	private Long weixinId;
	/**
	 * 公众号名称
	 */
	@Column(name = "name", nullable = false, length = 60)
	private String name;
	/**
	 * 公众号APPID
	 */
	@Column(name = "app_id", nullable = false, length = 32)
	private String appId;
	/**
	 * 公众号SECRET
	 */
	@Column(name = "secret", nullable = false, length = 32)
	private String secret;
	/**
	 * TOKEN
	 */
	@Column(name = "access_token", length = 1000)
	private String accessToken;
	
    /**
	 * token过期时间
	 */
	@Column(name = "expire_time", nullable = false, columnDefinition="datetime default '1970-01-01 00:00:00'")
	private Date expireTime;

	public Long getWeixinId() {
		return weixinId;
	}

	public void setWeixinId(Long weixinId) {
		this.weixinId = weixinId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}

	public Date getExpireTime() {
		return expireTime;
	}

	public void setExpireTime(Date expireTime) {
		this.expireTime = expireTime;
	}

}
